Create Shipment
Create Shipment
POST | /open-api/v2/label |
Header
Label | Required | Description |
---|---|---|
Api-Key | ✓ | Api Key, please log in to the system and find it in My Profile |
Api-Secret | ✓ | Api Secret, please log in to the system and find it in My Profile |
Entity Types
The address recognition API is currently designed to recognize the following types of entities:
Parameter | Type | Required | Description |
---|---|---|---|
custom_order_num | [string] | ✓ | |
shipment | [object] | ✓ | |
﹂﹂carrier | [string] | Carrier service provider code, this field will filter out the service of this service provider and create a label "If service are more than one, System will use the lowest price service to create a label." Example: ups,fedex | |
﹂﹂service_code | [string] | Indicate the carrier service type used for this shipment.Click here to see Service Types Example:ups_ground | |
﹂ship_from | [object] | - | |
﹂﹂uuid | [array] | Address unique id.If you want to improve the accuracy of the ship from address, you can choose to send only uuid. Click to see how to get uuid. Example:22d953b7-24c4-4ae9-afb4-111cc227b01e | |
﹂﹂postal_code | [string] | ✓ | Format [xxxxx] or [xxxxx-xxxx] Example:90045-6275 |
﹂﹂country_code | [string] | ✓ | This is the two-letter country code. Example:US |
﹂﹂state_province_code | [string] | ✓ | This is the two-letter state code. Example:CA |
﹂﹂is_residential | [boolean] | Indicate whether this address is residential (as opposed to commercial). Example:false | |
﹂﹂addresses | [array] | This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required. Example:6925 Riverview Ave | |
﹂﹂city | [string] | ✓ | City Name. Example:Kansas City |
﹂﹂name | [string] | Specify the shipper name.Maximum length is 35 characters. Example:Amazon | |
﹂﹂phone | [string] | Specify the shipper phone number. At least 10 digits. Example:1000000000 | |
﹂﹂attention | [string] | ✓ | Note.Maximum length is 35 characters. Example:Ann |
﹂ship_to | [object] | ✓ | - |
﹂﹂addresses | [array] | This is the combination of number, street name, etc. Maximum length per line is 35.Note:At least one line is required. Example:6925 Riverview Ave | |
﹂﹂city | [string] | ✓ | City Name. Example: PENFIELD |
﹂﹂state_province_code | [string] | ✓ | This is the two-letter state code. Example:NY |
﹂﹂postal_code | [string] | ✓ | Format :[xxxxx] or [xxxxx-xxxx] Example:14526 |
﹂﹂country_code | [string] | ✓ | This is the two-letter country code. Example:US |
﹂﹂name | [string] | Specify the recipient name.Maximum length is 35 characters. Example:Ann | |
﹂﹂phone | [string] | Specify the recipient phone number. At least 10 digits. Example:(999)-999-9999 | |
﹂﹂phone_ext | [string] | Maximum length is 4 characters. Example:1234 | |
﹂﹂is_residential | [boolean] | Indicate whether this address is residential (as opposed to commercial) Example:false | |
﹂﹂attention | [string] | Note.Maximum length is 35 characters. Example:Ann | |
﹂packages | [array] | ✓ | |
﹂﹂dimension | [object] | ✓ | Indicate the dimensions of the package. Note: The maximum/minimum dimension values varies based on the services and the packaging types. |
﹂﹂﹂width | [number] | ✓ | Indicate the width of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂height | [number] | ✓ | Indicate the height of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂length | [number] | ✓ | Indicate the length of the package. This value allows 2 explicit decimal position. Example:20.01 |
﹂﹂﹂code | [string] | ✓ | Indicate the Unit of measure for the provided dimensions. Valid Values are:in/cm Example:in |
﹂﹂weight | [object] | ✓ | Indicate the weight of the package. |
﹂﹂﹂code | [string] | ✓ | This is the package weight unit. Valid Values are:lb/oz/g/kg Example:lb |
﹂﹂﹂value | [number] | ✓ | This value allows 2 explicit decimal position. Example:68.25 |
﹂﹂insurance | [object] | Indicate the insurance | |
﹂﹂﹂code | [string] | This is the currency code for the amount. Example:USD | |
﹂﹂﹂value | [number] | This value allows 2 explicit decimal position. Example:300.01 | |
﹂﹂confirmation | [string] | ✓ | Indicate the Signature Type.Click here to see the confirmation supported by the service provider. Example:None |
﹂﹂quantity | [number] | ✓ | Package quantity Example:1 |
﹂﹂reference_numbers | [array] | ✓ | Reference information |
﹂﹂﹂code | [string] | ✓ | This is a customer reference type. Click here to see the reference type supported by the service provider. Example:INVOICE |
﹂﹂﹂value | [object] | ✓ | Maximum length for all customer references is 40 characters. Example:P84746-KMD |
﹂package_type | [object] | ✓ | Specify the packaging used.Click here to see Package Types. |
﹂﹂type | [string] | ✓ | Example:common |
﹂﹂name | [string] | ✓ | Example:Package |
﹂label_specification | [object] | Label specification | |
﹂﹂label_format | [string] | Example:pdf 。option:zpl , pdf | |
﹂pickup_date | [string] | ✓ | This is the shipment date. Format :[yyyymmdd] Example:20221001 |
curl -X POST \
'https://api.sandbox.shipber.com/open-api/v2/label' \
-H 'Content-Type:application/json' \
-H 'Api-Key:2cn1wgmfidytin3jef3b' \
-H 'Api-Secret:qRBYybjRch7BdTxO5NTyGUd6mBvowNbsjahnAnpdI-BXc5sCrRt15XGr-hc9oY7C' \
-d '{
"custom_order_num": "Test-20230113",
"shipment": {
"carrier": "fedex",
"service_code": "fedex_ground",
"ship_from": {
"uuid": "7b572b8d-08a3-4cc7-a711-1aae28e9ffcf"
},
"ship_to": {
"city": "Kansas City",
"name": "Test Company",
"addresses": [
"6925 Riverview Ave"
],
"postal_code": "66102",
"country_code": "US",
"state_province_code": "KS",
"phone": "0123456789"
},
"packages": [{
"dimension": {
"width": 7,
"height": 13,
"length": 4,
"code": "in"
},
"weight": {
"code": "lb",
"value": 6
},
"confirmation": "None",
"insurance": {
"code": "USD",
"value": 20
},
"quantity": 1,
"reference_numbers": [{
"code": "reference #1",
"value": "1"
}]
}],
"package_type": {
"type": "common",
"name": "Package"
},
"pickup_date": "20230113"
}
}'
{
"data": {
"status": "Printing",
"tracking_num": "Tracking",
"order_num": "order",
"shipment": {
"service_code": "fedex_ground",
"ship_from": {
"city": "LOS ANGELES",
"name": "Test Company",
"email": "[email protected]",
"addresses": ["6925 Riverview Ave"],
"postal_code": "66102",
"country_code": "US",
"is_residential": false,
"state_province_code": "CA",
"phone": "0123456789"
},
"ship_to": {
"city": "Kansas City",
"name": "Test Company",
"addresses": [
"6925 Riverview Ave"
],
"postal_code": "66102",
"country_code": "US",
"state_province_code": "KS",
"phone": "0123456789"
},
"packages": [{
"dimension": {
"width": 7,
"height": 13,
"length": 4,
"code": "in"
},
"weight": {
"code": "lb",
"value": 6
},
"confirmation": "Not Required",
"insurance": {
"code": "USD",
"value": 20
},
"quantity": 1,
"reference_numbers": [{
"code": "reference #1",
"value": "1"
}],
"watermark": ""
}],
"package_type": {
"type": "common",
"name": "Package"
},
"label_specification": {
"label_format": "pdf"
},
"pickup_date": "20230113"
},
"created_at": "2023-01-13T06:26:31.028Z",
"custom_order_num": "Test-20230113",
"is_return_label": false,
"rma_number": "",
"rma_reason": ""
}
}